<?php
require_once("lib/auth/session.php");
require_once("lib/sqlConnector.php");
require_once("lib/auth/user.php");
// comments on a post in DB
function createComment($postid, $content) {
    $userid = $GLOBALS['USERID'];
    sqlQuery("INSERT INTO comments (userid, postid, content) VALUES ('%s', '%s','%s')",
        array($userid,$postid,$content));
    header("Location: " . $_SERVER['HTTP_REFERER']);
}

?>